<!DOCTYPE html>
<html>
<head>
    <title>我的招生代理</title>
    <#include "/header.html">
    <link rel="stylesheet" href="/gaokao-admin/statics/css/zytb.css">
    <script src="/gaokao-admin/statics/libs/zytb.js"></script>
    <script language="javascript">
        function preview(oper)
        {
            if (oper < 10){
                bdhtml=window.document.body.innerHTML;//获取当前页的html代码
                sprnstr="<!--startprint"+oper+"-->";//设置打印开始区域
                eprnstr="<!--endprint"+oper+"-->";//设置打印结束区域
                prnhtml=bdhtml.substring(bdhtml.indexOf(sprnstr)+18); //从开始代码向后取html
                prnhtml=prnhtml.substring(0,prnhtml.indexOf(eprnstr));//从结束代码向前取html
                window.document.body.innerHTML=prnhtml;
                window.print();
                window.document.body.innerHTML=bdhtml;
            } else {
                window.print();
            }
            window.location.reload();
        }
    </script>
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList==0">
            <div class="grid-btn">
                <div class="form-group col-sm-2">
                    <input class="form-control" type="text" v-model="search" />
                </div>
                <a class="btn btn-default" @click="queryZN">查询</a>
                <!--<a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;</a>-->
                <a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
                    <!--<a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>-->
                    <a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
            </div>
    <table id="jqGrid"></table>
    <div id="jqGridPager"></div>
    </div>

    <div v-show="showList==1" class="panel panel-default">
        <div class="panel-heading">{{title}}</div>
        <form class="form-horizontal">
            <div class="form-group">
                <div class="col-sm-2 control-label">代理人姓名</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="agency.name" @click="newuserdeptTree" readonly="readonly" placeholder="代理人姓名"/>
                </div>
            </div>
            <!--<div class="form-group">-->
                <!--<div class="col-sm-2 control-label">密码</div>-->
                <!--<div class="col-sm-10">-->
                    <!--<input type="text" class="form-control" v-model="agency.password" placeholder="密码"/>-->
                <!--</div>-->
            <!--</div>-->
            <!--<div class="form-group">-->
                <!--<div class="col-sm-2 control-label">单位</div>-->
                <!--<div class="col-sm-10">-->
                    <!--<input type="text" class="form-control" v-model="agency.unit" placeholder="单位"/>-->
             <!--</div>-->
            <!--</div>-->
            <!--<div class="form-group">-->
                <!--<div class="col-sm-2 control-label">联系电话</div>-->
                <!--<div class="col-sm-10">-->
                    <!--<input type="text" class="form-control" v-model="agency.phone" placeholder="联系电话"/>-->
                <!--</div>-->
            <!--</div>-->
            <div class="form-group">
                <div class="col-sm-2 control-label">上级代理</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="agency.superior" @click="userdeptTree" readonly="readonly" placeholder="上级代理"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label"></div>
                <input type="button" class="btn btn-primary" @click="saveOrUpdate" value="确定"/>
                &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
            </div>
        </form>
    </div>




    <div v-show="showList==3">
        <div class="grid-btn">
            <!--<a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增代理</a>-->
            <input type=button name='back' title='返回' class="btn btn-primary" onclick="vm.showList=0" value=返回 />
        </div>
        <div>代理人姓名：{{username}}</div>
        <table id="jqGridZN"></table>
        <div id="jqGridPagerZN"></div>
    </div>
</div>

<!-- 选择新同事 -->
<div id="deptLayer" style="display: none;padding:10px;">
    <ul id="newUserTree" class="ztree"></ul>
</div>


<!-- 选择代理 -->
<div id="dailideptLayer" style="display: none;padding:10px;">
    <ul id="userTree" class="ztree"></ul>
</div>


<script src="${request.contextPath}/statics/js/modules/gaokaobaobei/daili.js?_${.now?long}"></script>
</body>
</html>